package cj.web.login.controller;

import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import cj.web.yc.service.CategoryService;
import net.paoding.rose.web.annotation.Path;
import net.paoding.rose.web.annotation.rest.Get;
import net.paoding.rose.web.var.Model;

/**
 * 首页
 * @author Administrator
 *
 */
@Path("")
public class IndexController {
	
	//类目根
	private static final int pId = 0;
	
	@Autowired
    private CategoryService categoryService;

	@Get("")
	public String index(Model model){
		List<Map> categorylis = categoryService.queryByPid(pId);
		model.add("categorylis", categorylis);
		return "/views/index.vm";
	}
}